package stud.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import stud.aistar.entity.Phone;
import stud.aistar.mapper.PhoneMapper;
import stud.aistar.service.IPhoneService;

/**
 * *
 *
 * @ClassName :wangyu
 * @Description
 * @Author
 * @Date2019/10/9 16:26
 * @Version V1.0
 */
@Service
@Transactional
public class PhoneServiceImpl implements IPhoneService {

    @Autowired
    private PhoneMapper mapper;

    @Override
    public Phone findPhone(String phone) {
        Phone p = mapper.findPhone(phone);
        return p;
    }

    @Override
    public void insertPhone(Phone phone) {
        mapper.insertPhone(phone);
    }

    @Override
    public void updatePhone(Integer id, Integer code) {
        mapper.updatePhone(id,code);
    }
}
